fix: increase memory limit for lint script to prevent OOM#7906
Merged
Conversation
- Enable `projectService` in ESLint config for better monorepo performance. - Disable `import-x/extensions` as it is redundant with `moduleResolution: Node16`. - Increase `NODE_OPTIONS` memory limit for the lint job in CI to prevent OOM errors.
cryptodev-2s
commented
Feb 11, 2026
mcmire
reviewed
Feb 11, 2026
Contributor
mcmire
left a comment
There was a problem hiding this comment.
Instead of modifying CI should we instead modify the lint script in package.json? Then engineers running this command manually don't have to remember to set this variable.
| extends: [typescript], | ||
| languageOptions: { | ||
| parserOptions: { | ||
| projectService: true, |
Contributor
There was a problem hiding this comment.
I see you removed this which I agree is probably best here.
If it's helpful, I was going to say that we already enable this in eslint-config here: https://github.com/MetaMask/eslint-config/blob/0b8cf6db0edcc5e1582bf188a5495bfd6f1cf069/packages/typescript/src/index.mjs#L28.
I suppose it is possible that we are overriding all parserOptions and are therefore not using projectService, though. I am not sure how ESLint merges options. It may be worth checking this.
cryptodev-2s
added a commit
that referenced
this pull request
May 21, 2026
The 6GB cap was set in #7906 (Feb 2026) when ESLint last started OOM-ing under typescript-eslint's typed rules. The monorepo has grown enough since that the cap is again insufficient — CI for this branch started OOM-ing after a routine merge with main brought in five more commits, despite no on-branch changes affecting lint. Bumping to 8GB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
This PR fixes "JavaScript heap out of memory" errors that occur during linting, both in CI and potentially in local environments.
To address this, I have updated the
lint:eslintscript inpackage.jsonto explicitly increase the Node.js memory limit.Specific changes:
package.json: Modified thelint:eslintscript to includeNODE_OPTIONS='--max-old-space-size=6144'. This ensures that the 6GB memory limit is applied whenever the lint command is run, whether by a developer locally or by the CI runner.References
Checklist
Note
Low Risk
Only adjusts the root
lint:eslintscript to raise Node’s heap limit; no runtime or library code changes.Overview
Prevents
eslintOOM failures during linting by updating the rootlint:eslintscript inpackage.jsonto run withNODE_OPTIONS='--max-old-space-size=6144'(6GB) before invokingyarn eslint.Written by Cursor Bugbot for commit bd29357. This will update automatically on new commits. Configure here.